import request from '@/utils/request'

const api = {
    groupBuyList: '/activity.groupBuy/lists',
    groupBuyAdd: '/activity.groupBuy/add',
    groupBuyEdit: '/activity.groupBuy/edit',
    groupBuyDel: '/activity.groupBuy/delete',
    groupBuyOrderList: '/activity.groupBuyOrder/lists',
    groupBuyOrderDetail: '/activity.groupBuyOrder/detail',
    groupBuyOrderSend: '/activity.groupBuyOrder/sendOut',
    groupBuyOrderSendEdit: '/activity.groupBuyOrder/sendOutEdit'
}

export function groupBuyOrderSendEdit (parameter) {
    return request({
        url: api.groupBuyOrderSendEdit,
        method: 'get',
        params: parameter
    })
}

export function groupBuyOrderSend (parameter) {
    return request({
        url: api.groupBuyOrderSend,
        method: 'get',
        params: parameter
    })
}

export function groupBuyOrderDetail (parameter) {
    return request({
        url: api.groupBuyOrderDetail,
        method: 'get',
        params: parameter
    })
}

export function groupBuyOrderList (parameter) {
    return request({
        url: api.groupBuyOrderList,
        method: 'get',
        params: parameter
    })
}

export function groupBuyDel (parameter) {
    return request({
        url: api.groupBuyDel,
        method: 'get',
        params: parameter
    })
}

export function groupBuyEdit (parameter) {
    return request({
        url: api.groupBuyEdit,
        method: 'post',
        data: parameter
    })
}

export function groupBuyAdd (parameter) {
    return request({
        url: api.groupBuyAdd,
        method: 'post',
        data: parameter
    })
}

export function groupBuyList (parameter) {
    return request({
        url: api.groupBuyList,
        method: 'get',
        params: parameter
    })
}
